**Table 4 Results**

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad if south==1 & white==1 & voted==1 & yr2012==1 [pweight= weight], cluster(county_fips)

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad if south==1 & white==1 & voted==1 & yr2016==1 [pweight= weight], cluster(county_fips)

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad if south==1 & white==1 & voted==1 & yr2020==1 [pweight= weight], cluster(county_fips)

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips)


***Generate Predicted Probability Republican if Male***

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips) 

gen keep = 1 if e(sample)
drop if keep ~=1
save temp, replace

set seed 99
mat b = e(b)
mat V = e(V)

drawnorm x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 cons, mean(b) cov(V) n(1000) clear

sum

merge using temp


gen p_male=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*1 + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_male=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_nonmale=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*0 + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_nonmale=r(mean) in `i'
		
	}
drop p_1-p_1000

sum p_male p_nonmale 
centile p_male p_nonmale, centile(2.5 97.5)

***Generate Predicted Probability Republican if Protestant***

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips) 

gen keep = 1 if e(sample)
drop if keep ~=1
save temp, replace

set seed 99
mat b = e(b)
mat V = e(V)

drawnorm x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 cons, mean(b) cov(V) n(1000) clear

sum

merge using temp


gen p_prot=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*1 + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_prot=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_nonprot=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*0 + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_nonprot=r(mean) in `i'
		
	}
drop p_1-p_1000

sum p_prot p_nonprot 
centile p_prot p_nonprot, centile(2.5 97.5)

***Generate Predicted Probability Republican if a certain Age Group***

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips) 

gen keep = 1 if e(sample)
drop if keep ~=1
save temp, replace

set seed 99
mat b = e(b)
mat V = e(V)

drawnorm x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 cons, mean(b) cov(V) n(1000) clear

sum

merge using temp


gen p_age18_29=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*1 + ///
	x14[`i']*0 + x15[`i']*0 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_age18_29=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_age30_44=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*0 + ///
	x14[`i']*1 + x15[`i']*0 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_age30_44=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_age45_64=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*0 + ///
	x14[`i']*0 + x15[`i']*1 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_age45_64=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_age65=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*0 + ///
	x14[`i']*0 + x15[`i']*0 + x16[`i']*college_grad + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_age65=r(mean) in `i'
		
	}
drop p_1-p_1000

sum p_age18_29 p_age30_44 p_age45_64 p_age65 
centile p_age18_29 p_age30_44 p_age45_64 p_age65, centile(2.5 97.5)

***Generate Predicted Probability Republican if College Graduate***

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips) 

gen keep = 1 if e(sample)
drop if keep ~=1
save temp, replace

set seed 99
mat b = e(b)
mat V = e(V)

drawnorm x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 cons, mean(b) cov(V) n(1000) clear

sum

merge using temp


gen p_collgrad=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*1 + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_collgrad=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_noncollgrad=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*0 + ///
	x17[`i']*yr2016 + x18[`i']*yr2020) 
	summarize p_`i', meanonly
	replace p_noncollgrad=r(mean) in `i'
		
	}
drop p_1-p_1000

sum p_collgrad p_noncollgrad 
centile p_collgrad p_noncollgrad, centile(2.5 97.5)

***Generate Predicted Probability Republican if certain Election***

probit pid_leaners ar fl ga la ms nc sc tn tx va male protestant age_18_29 age_30_44 age_45_64 ///
college_grad yr2016 yr2020 if south==1 & white==1 & voted==1 & yr_2012_2020==1 /// 
[pweight= weight], cluster(county_fips) 

gen keep = 1 if e(sample)
drop if keep ~=1
save temp, replace

set seed 99
mat b = e(b)
mat V = e(V)

drawnorm x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 cons, mean(b) cov(V) n(1000) clear

sum

merge using temp


gen p_yr2012=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*0 + x18[`i']*0) 
	summarize p_`i', meanonly
	replace p_yr2012=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_yr2016=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*1 + x18[`i']*0) 
	summarize p_`i', meanonly
	replace p_yr2016=r(mean) in `i'
		
	}
drop p_1-p_1000

gen p_yr2020=.
quietly forvalues i = 1/1000 {
	gen p_`i'=normal(cons[`i'] + x1[`i']*ar + x2[`i']*fl + ///
	x3[`i']*ga + x4[`i']*la + x5[`i']*ms +  ///
	x6[`i']*nc + x7[`i']*sc + x8[`i']*tn +  ///
	x9[`i']*tx + x10[`i']*va + x11[`i']*male + x12[`i']*protestant + x13[`i']*age_18_29 + ///
	x14[`i']*age_30_44 + x15[`i']*age_45_64 + x16[`i']*college_grad + ///
	x17[`i']*0 + x18[`i']*1) 
	summarize p_`i', meanonly
	replace p_yr2020=r(mean) in `i'
		
	}
drop p_1-p_1000

sum p_yr2012 p_yr2016 p_yr2020 
centile p_yr2012 p_yr2016 p_yr2020, centile(2.5 97.5)
